#pragma once
#include "stdafx.h"
#include "curl_task.h"

class curl_event_loop;

namespace async_curl {

	//init, async , thread safe
	void gcurl_init();

	//dealloc, async , thread safe
	void gcurl_exit();

	//waitfor all res released
	void gcurl_wait();

	//post async , thread safe
	void post(const std::string& url,
		const std::string& req_data,
		curl_task::curl_cb_t&& cb);

	//get async , thread safe
	void get(const std::string& url, curl_task::curl_cb_t&& cb);
}
